#include<iostream>
#include<cstring>

using namespace std;
long long   a[10000001];

void qianzhuihe()
{
	int n;
	cin >> n;
	a[0] = 1;
	for (int i=1;i<=n;i++)
	{
		a[i] = i*a[i-1];		
	}
	long long sum = 0;
	for (int i = 1;i<=n;i++)
	{
		//printf("a[%d]=%lld\n",i,a[i]);
		sum +=a[i];		
	}
	printf("q:%lld\n",sum);
	
}
long long  dg(int x)
{
	if (x>0)
		return x*dg(x-1);
	else return 1;
}
void diguis()
{
	int n;
	cin >> n;
	long long sum = 0 ;
	for (int i=1;i<=n;i++)
		sum +=dg(i)	;
		
	printf("d:%lld\n",sum);
}

int main()
{
	qianzhuihe();
	//diguis();
	return 0;	
} 
